### This script: Effect of newspaper exit on individual-level outcomes using  SOEP v.35 data (1984-2018)
## Information on the data set: https://www.diw.de/en/diw_01.c.742256.en/edition/soep-core_v35__data_1984-2018.html
## Information on data access: https://www.diw.de/en/diw_01.c.601584.en/data_access.html
## Note that access to regional SOEP data is only possible onsite at the DIW Berlin:
## Information on regional data: https://www.diw.de/en/diw_01.c.683748.en/regional_data.html#c_diw_01.c.683753.de

library(tidyverse)

rm(list = ls())

## Load SOEP Results:
dat <- read_rds('data/SOEP_results.rds')

## Plot data:
pd <- position_dodge(1)

## Plot
p1 <- ggplot(dat, aes(outcome, estimate)) +
  geom_hline(yintercept = 0, linetype = 'dotted') +
  geom_errorbar(aes(ymin = conf.low90, ymax = conf.high90),
                position = pd,
                width = 0, size = 1) +
  geom_errorbar(aes(ymin = conf.low95, ymax = conf.high95),
                # position = pd,
                width = 0, size = 0.5) +
  geom_point(
    position = pd,
    size =3,
    shape = 21,
    fill  ='white') +
  theme(legend.position = 'bottom') +
  theme_bw() + xlab('') +ylab('Effect of newspaper exit') +
  theme(legend.position = 'bottom') 

p1
